INCLUDE_PATH := ./submodule

SRCS += $(wildcard ./*.c) $(wildcard ./submodule/*.c)
OBJS = $(patsubst %.c,./obj/%.o,$(notdir $(SRCS)))

TEMP += ./ ./submodule/

TARGET := main

$(TARGET): ${OBJS} 
	gcc ${OBJS} -o ${TARGET}
    
obj/%.o:./%.c 
	gcc -I${INCLUDE_PATH} -fPIC -c $< -o $@

obj/%.o:./submodule/%.c 
	gcc -I${INCLUDE_PATH} -fPIC -c $< -o $@

.PHYONY: clean
clean:
	rm -rf ${OBJS} 
	rm -rf ${TARGET} 

